import requests
import re


def req_url(musicName):
    url = 'http://mp34.xyz/'
    data = {'mp3': musicName}
    rep = requests.get(url, params=data)
    rep.encoding = 'utf-8'
    # print(rep.text)
    res = re.findall('<a href=".v=(.+?)">', rep.text)[0]
    data['v'] = res
    del data['mp3']
    # print(res)
    rep = requests.get(url, params=data)
    rep.encoding = 'utf-8'
    # print(rep.text)
    res = re.findall('<a href="(.+?mp3)"', rep.text)[0]
    # print(res)
    return res
